package cn.starrysky108.simpleerp.purchase.entity;

import cn.starrysky108.simpleerp.core.base.BaseEntity;
import cn.starrysky108.simpleerp.core.enums.OrderStatusEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.math.BigDecimal;

/**
 * <p>
 * 采购单
 * </p>
 *
 * @author Carl Lee
 * @since 2021-08-14
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("purchase")
@ApiModel(value = "Purchase对象", description = "采购单")
public class Purchase extends BaseEntity {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "流水号")
    @TableField("serial_number")
    private Long serialNumber;


    @ApiModelProperty(value = "采购员id")
    @TableId(value = "buyer_id")
    private Long buyerId;

    @ApiModelProperty(value = "供应商id")
    @TableId(value = "provider_id")
    private Long providerId;

    @ApiModelProperty(value = "管理员/审核人id")
    @TableId(value = "administrator_id")
    private Long administratorId;

    @ApiModelProperty(value = "总共花费")
    @TableId(value = "cost")
    private BigDecimal cost;

    @ApiModelProperty(value = "采购总量")
    @TableField("count")
    private Integer count;

    @ApiModelProperty(value = "订单状态")
    @TableField("status")
    private OrderStatusEnum status;



}
